<!DOCTYPE html>
<html lang="zh-cn">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<link rel="stylesheet" href="Alert.css">
</head>

<body>
	<button>点我弹窗</button>
	<script src="Alert.js"></script>
	<script>
		// 使用自定义
		YiHang.alert({
			title: '全局自定义设置'
		}, true);
		document.querySelector('button').onclick = () => {
			YiHang.alert({
				title: '自定义标题',
				content: '自定义内容',
				buttons: [
					{
						text: '取消',
						callback: () => {
							console.log('取消按钮被点击');
						},
					},
					{
						text: '确认',
						classList: ['primary'],
						callback: () => {
							console.log('确认按钮被点击');
						},
					},
				],
			});
		}
		// 关闭弹窗
		// myAlert.close();
	</script>
</body>

</html>